<!DOCTYPE html>
<html lang="ru">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>2 задание</title>
	<link rel="stylesheet" href="../css/style.css">
	<link rel="shortcut icon" href="https://media04.lokalkompass.de/article/2017/07/25/3/9561933_XXL.jpg">
</head>
<body>
	<div class="header-wraper">
		<div class="header">
			<a href="/" class="logo-link">
				<img src="../css/s2.png" alt="logo" class="logo-img">
				<p class="logo-text">На главную</p>
			</a>
		</div>
	</div>
	<div class="content-wraper">
		<div class="content">
			<form action="#" method="GET">
				<h1 class="title">Введите цифру дня недели:</h1>
				<input type="text" name="day_number" class="input-text">
				<button type="submit" class="butsub" >Перевести</button>
			</form>
			<div class="translate">
				<span>Перевод: </span>
				<span><?php

					if ($_GET['day_number']){
						$day_number = $_GET['day_number'];
						switch ($day_number) {
							case 1:
								$translare = "понидельник";
								break;
							
							case 2:
								$translare = "вторник";
								break;

							case 3:
								$translare = "среда";
								break;

							case 4:
								$translare = "четверг";
								break;

							case 5:
								$translare = "пятница";
								break;

							case 6:
								$translare = "суббота";
								break;

							case 7:
								$translare = "воскресение";
								break;

							default:
								$translare = "неизвестный";
								break;
						}
						echo $translare;
					}
				?></span>
			</div>
		</div>
	</div>
</body>
</html>
